﻿<Window x:Class="Demos.Puzzles.WolfGoatCabbage.View"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Wolf Goat Cabbage" Height="600" Width="800" Name="ventanaWDW" ResizeMode="CanMinimize">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="{Binding ElementName=fondoIMG, Path=ActualHeight}"></RowDefinition>
            <RowDefinition Height="50"></RowDefinition>
            <RowDefinition></RowDefinition>
        </Grid.RowDefinitions>

        <Canvas Grid.Row="0" Name="RioCV">
            <Image Name="fondoIMG" Source="media/fondo.jpg" Width="{Binding ElementName=ventanaWDW, Path=ActualWidth}"></Image>
            <Image Name="balsaIMG" Source="media/balsa.png" Width="125"
                   Canvas.Left="{Binding BalsaX}" 
                   Canvas.Bottom="110"></Image>
            <Image Name="loboIMG" Source="media/wolf.png" Width="125"
                   Canvas.Left="{Binding LoboX}" 
                   Canvas.Bottom="{Binding LoboY}"></Image>
            <Image Name="cabraIMG" Source="media/goat.png" Width="80" 
                   Canvas.Left="{Binding CabraX}" 
                   Canvas.Bottom="{Binding CabraY}"></Image>
            <Image Name="colIMG" Source="media/cabbage.png" 
                   Canvas.Left="{Binding ColX}" 
                   Canvas.Bottom="{Binding ColY}"></Image>
        </Canvas>

        <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="10" HorizontalAlignment="Center">
            <Label>Velocidad:</Label>
            <Slider Value="{Binding VelocidadAnimacion, UpdateSourceTrigger=PropertyChanged}"
                    Width="300" Minimum="100" Maximum="2000"></Slider>
        </StackPanel>
        
        <StackPanel Grid.Row="2" Name="opcionesSP" Orientation="Vertical" VerticalAlignment="Bottom">
            <Grid Margin="10,10,10,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="38*"></ColumnDefinition>
                    <ColumnDefinition Width="215*" />
                    <ColumnDefinition Width="253*"></ColumnDefinition>
                    <ColumnDefinition Width="253*"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <RadioButton Grid.ColumnSpan="2" IsEnabled="False"
                             IsChecked="{Binding ContenidoRadioButtons[0], UpdateSourceTrigger=PropertyChanged}"
                             >Lobo</RadioButton>
                <Button Grid.Column="2" Width="100" Height="25"
                        Command="{Binding ComenzarCommand}">Comenzar</Button>
                <RadioButton Width="50" Grid.Column="3" HorizontalAlignment="Right" IsEnabled="False"
                             IsChecked="{Binding ContenidoRadioButtons[1], UpdateSourceTrigger=PropertyChanged}"
                             >Lobo</RadioButton>
            </Grid>

            <Grid Margin="10,10,10,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition></ColumnDefinition>
                    <ColumnDefinition></ColumnDefinition>
                    <ColumnDefinition></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <RadioButton Grid.Column="0" IsEnabled="False"
                             IsChecked="{Binding ContenidoRadioButtons[2], UpdateSourceTrigger=PropertyChanged}"
                             >Cabra</RadioButton>
                <Button Grid.Column="1" Width="100" Height="25"
                        Command="{Binding PararCommand}"
                        Content="{Binding ContenidoBotonParar, UpdateSourceTrigger=PropertyChanged}"></Button>
                <RadioButton Width="50" Grid.Column="2" HorizontalAlignment="Right" IsEnabled="False"
                             IsChecked="{Binding ContenidoRadioButtons[3], UpdateSourceTrigger=PropertyChanged}"
                             >Cabra</RadioButton>
            </Grid>

            <Grid Margin="10">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition></ColumnDefinition>
                    <ColumnDefinition></ColumnDefinition>
                    <ColumnDefinition></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <RadioButton Grid.Column="0" IsEnabled="False"
                             IsChecked="{Binding ContenidoRadioButtons[4], UpdateSourceTrigger=PropertyChanged}"
                             >Col</RadioButton>
                <Button Grid.Column="1" Width="100" Height="25" Click="SalirClick">Salir</Button>
                <RadioButton Width="50" Grid.Column="2" HorizontalAlignment="Right" IsEnabled="False"
                             IsChecked="{Binding ContenidoRadioButtons[5], UpdateSourceTrigger=PropertyChanged}"
                             >Col</RadioButton>
            </Grid>
        </StackPanel>
    </Grid>
</Window>
